#!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################
# Author: Mu yanru
# Date  : 2019.3
# Email : muyanru345@163.com
###################################################################
# Import future modules
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

# Import local modules
from dayu_widgets import dayu_theme


def score_color(score, y):
    if score < 60:
        return dayu_theme.error_color
    elif score < 80:
        return dayu_theme.warning_color
    elif score >= 90:
        return dayu_theme.success_color
    return dayu_theme.info_color


header_list = [
    {
        "label": "",
        "key": "name",
        "width": 400,
        "font": lambda x, y: {"underline": True},
        "icon": "user_fill.svg",
    }
]

data_list = [
    {
        "name": "John Brown",
    },    {
        "name": "John Brown",
    },    {
        "name": "John Brown",
    },    {
        "name": "John Brown",
    },    {
        "name": "John Brown",
    },    {
        "name": "John Brown",
    },    {
        "name": "John Brown",
    },    {
        "name": "John Brown",
    },    {
        "name": "John Brown",
    },
]

tree_data_list = [
    {
        "name": "John Brown",

        "children": [
            {
                "name": "Jim Green",

            },
            {
                "name": "Zhang Xiaoming",

            },
        ],
    }
]